from pyflink.datastream import StreamExecutionEnvironment, RuntimeExecutionMode, MapFunction

# 1、创建flink执行环境
env = StreamExecutionEnvironment.get_execution_environment()

# 修改并行度
env.set_parallelism(1)

# 2、读取数据,得到DataStream，相当于RDD  （有界流）
lines_ds1 = env.read_text_file("../../data/students.txt")
lines_ds2 = env.read_text_file("../../data/students.txt")

union_ds = lines_ds1.union(lines_ds2)

union_ds.print()


env.execute()
